package window;

import java.awt.Color;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;

public class Frame
{

  public Frame()
  {
    JFrame frame = new JFrame("Window");
    
    JButton b0 = new JButton("");
    JButton b1 = new JButton("");
    JButton b2 = new JButton("");
    JButton b3 = new JButton("");
    JButton b4 = new JButton("");
    JButton b5 = new JButton("");
    JButton b6 = new JButton("");
    JButton b7 = new JButton("");
    JButton b8 = new JButton("");
    JButton b9 = new JButton("");
    JButton b10 = new JButton("");
    JButton reset = new JButton("Reset Game");
    
    JLabel txtWonOrLost = new JLabel("");

    int gameCount = 0;
    JLabel txtGame = new JLabel("Game:   " + gameCount);

    int loseCount = 0;
    JLabel txtLosses = new JLabel("Losses:   " + loseCount);

    int winCount = 0;
    JLabel txtWins = new JLabel("Wins:   " + winCount);

    frame.setTitle("Wolf und Schafe");

    int frameWidth = 400;
    int frameHeight = 400;
    int bSize = 21;
    int buttonDistance = 8;
    
    b0.setBackground(Color.BLACK);
    b1.setBackground(Color.BLACK);
    b3.setBackground(Color.BLACK);
    b5.setBackground(Color.RED);


    b0.setBounds(frameWidth / buttonDistance * 4 - bSize / 2, frameHeight
        / buttonDistance * 5, bSize, bSize);
    b1.setBounds(frameWidth / buttonDistance * 3 - bSize / 2, frameHeight
        / buttonDistance * 4, bSize, bSize);
    b2.setBounds(frameWidth / buttonDistance * 4 - bSize / 2, frameHeight
        / buttonDistance * 4, bSize, bSize);
    b3.setBounds(frameWidth / buttonDistance * 5 - bSize / 2, frameHeight
        / buttonDistance * 4, bSize, bSize);
    b4.setBounds(frameWidth / buttonDistance * 3 - bSize / 2, frameHeight
        / buttonDistance * 3, bSize, bSize);
    b5.setBounds(frameWidth / buttonDistance * 4 - bSize / 2, frameHeight
        / buttonDistance * 3, bSize, bSize);
    b6.setBounds(frameWidth / buttonDistance * 5 - bSize / 2, frameHeight
        / buttonDistance * 3, bSize, bSize);
    b7.setBounds(frameWidth / buttonDistance * 3 - bSize / 2, frameHeight
        / buttonDistance * 2, bSize, bSize);
    b8.setBounds(frameWidth / buttonDistance * 4 - bSize / 2, frameHeight
        / buttonDistance * 2, bSize, bSize);
    b9.setBounds(frameWidth / buttonDistance * 5 - bSize / 2, frameHeight
        / buttonDistance * 2, bSize, bSize);
    b10.setBounds(frameWidth / buttonDistance * 4 - bSize / 2, frameHeight
        / buttonDistance, bSize, bSize);
    reset.setBounds(frameWidth / buttonDistance * 4 - 103 / 2,
        frameHeight - 80, 103, 20);
    txtWonOrLost.setBounds(frameWidth / 2 - 25, frameHeight / buttonDistance
        * 6 - 17, 100, bSize);
    txtGame.setBounds(30, 20, 100, bSize);
    txtLosses.setBounds(30, 45, 100, bSize);
    txtWins.setBounds(30, 70, 100, bSize);



    frame.getContentPane().add(b0);
    frame.getContentPane().add(b1);
    frame.getContentPane().add(b2);
    frame.getContentPane().add(b3);
    frame.getContentPane().add(b4);
    frame.getContentPane().add(b5);
    frame.getContentPane().add(b6);
    frame.getContentPane().add(b7);
    frame.getContentPane().add(b8);
    frame.getContentPane().add(b9);
    frame.getContentPane().add(b10);
    frame.getContentPane().add(reset);
    frame.getContentPane().add(txtWonOrLost);
    frame.getContentPane().add(txtGame);
    frame.getContentPane().add(txtLosses);
    frame.getContentPane().add(txtWins);



    frame.setBounds(10, 10, 600, 600);
    Graph grafik = new Graph();

    frame.add(grafik);
    frame.setVisible(true);
  }
  
  public void doStuff()
  {
    
  }
}
